<?php

use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;

/**
 * @var yii\web\View $this
 * @var app\models\Message $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="message-form">

    <?php $form = ActiveForm::begin(['type'=>ActiveForm::TYPE_HORIZONTAL]); echo Form::widget([

    'model' => $model,
    'form' => $form,
    'columns' => 1,
    'attributes' => [

'receiver_id'=>['type'=> Form::INPUT_TEXT, 'options'=>['placeholder'=>'Enter Receiver ID...']], 

'title'=>['type'=> Form::INPUT_TEXT, 'options'=>['placeholder'=>'Enter Title...', 'maxlength'=>100]], 

'content'=>['type'=> Form::INPUT_TEXTAREA, 'options'=>['placeholder'=>'Enter Content...']], 

    ]


    ]);
    echo Html::submitButton(yii::t('Message','Sent'), ['onClick'=>'return sentmessage()', 'class' => 'btn btn-success pull-right','style'=>"width:20%"]);
    ActiveForm::end(); ?>

</div>
